package com.example.shoppingmall.service;

import com.example.shoppingmall.dao.AdvertisingspaceMapper;
import com.example.shoppingmall.pojo.Advertisingcode;
import com.example.shoppingmall.pojo.Advertisingspace;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class AdvertisingspaceService{
    @Autowired
    AdvertisingspaceMapper advertisingspaceMapper;

    public List<Advertisingspace> getAdvertisingspacelist(String name, String utime, Integer pageno, Integer pageSize) {
        return advertisingspaceMapper.getAdvertisingspacelist(name, utime, pageno, pageSize);
    }

    public int spacecount(String name, String utime) {
        return advertisingspaceMapper.spacecount(name,utime);
    }

    public int addspace(Advertisingspace advertisingspace) {
        return advertisingspaceMapper.addspace(advertisingspace);
    }

    public int updspace(Advertisingspace advertisingspace) {
        return advertisingspaceMapper.updspace(advertisingspace);
    }

    public int delspace(Integer id) {
        return advertisingspaceMapper.delspace(id);
    }

    public List<Advertisingcode> getcodelist(){
        return advertisingspaceMapper.getcodelist();
    }

    public Advertisingspace selspace(Integer id){
        return advertisingspaceMapper.selspace(id);
    }
}
